package com.eaoa.uc.busroute.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.eaoa.base.EABaseAction;
import com.eaoa.query.bus.BusRouteQuery;
import com.eaoa.vo.bus.BusRoute;
import com.stony.core.util.CoreUtils;

public class BusRouteManageSearchExpandAction extends EABaseAction{

	protected ActionForward doWork(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {

		Long id = CoreUtils.parseLong(request.getParameter("routeno"));

		BusRoute route = BusRouteQuery.loadByNO(id);

		request.setAttribute("result", route);

//		if (id != null) {
//			Map attachments = AttachmentUtils.getAttachmentMap(
//					AttachmentConstants.ATTACHMENTTYPE_VEHICLE, id);
//			request.setAttribute("attachments", attachments);
//		}

		return mapping.findForward("success");
	}
}